package com.sls.web.manager.recharge.service;

import java.util.List;

import com.sls.web.manager.page.Pagination;
import com.sls.web.manager.pojo.UserInfoVO;
import com.sls.web.manager.recharge.pojo.SystemProduct;
import com.sls.web.manager.recharge.querybean.SystemProductQuery;

/**
 * @author sxf
 * 
 */
public interface SystemProductService {
	public boolean insert(SystemProduct info, UserInfoVO userInfoVO)
			throws Exception;

	public boolean update(SystemProduct info, UserInfoVO userInfoVO)
			throws Exception;

	public boolean delete(SystemProduct info, UserInfoVO userInfoVO)
			throws Exception;

	// 系统产品表查询
	/**
	 * 系统产品表查询
	 * 
	 * <br>
	 * 参数:id,name,productType
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public Pagination<SystemProduct> queryPage(SystemProductQuery query,
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * 系统产品表直冲分页查询 <br>
	 * 参数:id,name,productType
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public List<SystemProduct> queryList(SystemProductQuery query,
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * 系统产品表查询卡密产品
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public List<SystemProduct> queryListProductTypeCardStock(
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * 系统产品表查询直冲产品
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public List<SystemProduct> queryListProductTypeFling(UserInfoVO userInfoVO)
			throws Exception;

	/**
	 * 系统产品表查询 <br>
	 * 参数:id,name,productType
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public SystemProduct queryOne(SystemProductQuery query,
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * @param id
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public SystemProduct queryOneById(String id, UserInfoVO userInfoVO)
			throws Exception;

	// 卡密管理查询
	/**
	 * 卡密管理查询 <br>
	 * 参数:id,name,productType
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public Pagination<SystemProduct> queryCardMangementPage(
			SystemProductQuery query, UserInfoVO userInfoVO) throws Exception;

	/**
	 * 卡密管理查询 <br>
	 * 参数:id,name,productType
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public List<SystemProduct> queryCardMangementList(SystemProductQuery query,
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * 卡密管理查询 <br>
	 * 参数:id,name,productType
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public SystemProduct queryCardMangementOne(SystemProductQuery query,
			UserInfoVO userInfoVO) throws Exception;
	public List<SystemProduct> findRechargeList(UserInfoVO userInfoVO)throws Exception;
	/**
	 * 缓存中查询系统产品信息，如没有则去数据库中加载
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public SystemProduct findRechargeById(String id,UserInfoVO userInfoVO)throws Exception;
	public void insertRecharge(SystemProduct sp,UserInfoVO userInfoVO) throws Exception;
	public void updateRecharge(SystemProduct sp,UserInfoVO userInfoVO) throws Exception;
	public void deletedRecharge(String id,UserInfoVO userInfoVO)throws Exception;
}
